While the previous pass through fixed one place where we knew that
fdt_getprop would be given a positive len, in the case of 'fdt set' we
do not, so check that we did no get NULL from fdt_getprop().
Cc: Simon Glass <[email protected]>
Reported-by: Coverity (CID: 163249)
Fixes
72c98ed1ab48 ("fdt: Add a check to do_fdt() for coverity")
Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
len = 0;
} else {
ptmp = fdt_getprop(working_fdt, nodeoffset, prop, &len);
+ if (!ptmp) {
+ printf("prop (%s) not found!\n", prop);
+ return 1;
+ }
if (len > SCRATCHPAD) {
printf("prop (%d) doesn't fit in scratchpad!\n",
len);